<{include file="public/header.html"}>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
<script type="text/javascript">is_load_face=true,share_type="video";</script>
		<header class="title-fixed w100">
			<div class="title title-border-sm bj-white">
                    <!--<a href="javascript:;" class="icon-return iconfont title-top title-left col-red" onclick="javascript:history.back(-1);">&#xe604;</a>-->
                    <a class="title-top title-right iconfont col-red _share">&#xe94c;</a>
                    <input type="hidden" id="_T_video_info" data-vid="<{$item['video_id']}>" data-title="<{$item['title']}>--溜溜视频专栏" data-desc="<{$item['desc']}>" data-link="<{$item['detail_url']}>" data-thumb="<{$item['img_url']}>"/>
                    <h1 class="text-center name">溜溜视频</h1>
			</div>
		</header>
		<section class="article-container mt50 mb60">
                    <div class="video-box" style="width:100%;position:relative;padding-bottom:56.25%;height: 0;">

                    <video class="video" poster="<{$item['img_url']}>" controls preload style="position: absolute;top:0;left: 0;width: 100%;height: 100%">
						<source src="<{$item['link_url']}>" media="only screen" type="video/mp4"/>
					</video>

			</div>
			<!--点赞、浏览数、转发、赞、不赞-->
			<div class="video-info">
				<ul class="video-function f-cb">
					<li class="fl"><a class="iconfont icon-comments" href="javascript:;">&#xe94b;<span><{$item['commentnum']}>条评论</span></a></li>
					<li class="fl"><a class="iconfont" href="javascript:;">&#xe788;<span class="read_num_show"><{$item['readnum']}></span></a></li>
					<li class="fr text-right<{if $item['is_hate']}>col-red<{/if}>"><a class="iconfont <{if !$item['is_like_or_hate_invilib']}>video-like-btn<{/if}> " data-value="<{$item['is_hate']}>" data-type="hate" href="javascript:;">&#xe62e;<span><{$item['hates']}></span></a></li>
					<li class="fr text-right <{if $item['is_like']}>col-red<{/if}>"><a class="iconfont <{if !$item['is_like_or_hate_invilib']}>video-like-btn<{/if}> " data-value="<{$item['is_like']}>" data-type="like" href="javascript:;">&#xe616;<span><{$item['likes']}></span></a></li>
				</ul>
			</div>
			<!--视频简介-->
			<section class="video-abstract">
				<p><{$item['title']}><{$item['desc']}></p>
			</section>
			<!--贵宾席-->
			<div class="admire plr15 ptb5">
				<p class="text-center font12 col-grey999 pb10">已有<i class="col-red"><{$reward|count}>人</i>打赏</p>
				<ul class="f-cb plr5">
					<{foreach from=$reward item=val key=key}>
					<{if ($key + 1) <= 5}>
					<li><a href="<{$val['space_url']}>"><img src="<{$val['head_img']}>"/></a></li>
					<{/if}>
					<{/foreach}>
					<{if count($reward) > 5}>
					<div class="disnone">
						<{foreach from=$reward item=val key=key}>
						<{if ($key + 1) > 5}>
						<li><a href="<{$val['space_url']}>"><img src="<{$val['head_img']}>"/></a></li>
						<{/if}>
						<{/foreach}>
					</div>
					<li><a href="javascript:;"></a></li>
					<{/if}>
				</ul>
			</div>
			<!--所有评论-->
			<div class="comments plr15 ptb5 sliding-jq">
                            <p class="con-title mb5 mt10">大家说</p>
				<div class="video-comment">
					<div class="head fl"><img src="<{$item['head_img']}>" alt="" onerror="this.onerror=null;this.src='http://static.tan66.com/upfiles/head.png';"/></div>
					<div class="video-reply publicText">
						<b></b>
						<a href="javascript:;">这位同学，说说你的感想</a>
					</div>
				</div>
				<ul class="article-head" id="comment-onload-box">
				</ul>
				<div class="loading" id="noresults" style="display: none;">
					<a href="javascript:;" class="load-success empty-load">
						<img src="<{$style_dir}>/img/none/no-comments.jpg">
					</a>
				</div>
				<div class="loading" id="loading">
					<a class="/*pull-load*/ load-success" href="javascript:;">加载中...</a>
				</div>
				<div class="loading" id="nomoreresults" style="display: none;">
					<a href="javascript:;" class="load-success nomore-load">已经到底啦~~~</a>
				</div>
			</div>
		</section>
		<!--输入框 弹窗-->
		<div class="public-field-bj publick-jq1 comment-content-box">
			<div class="public-field-text w100 bj-white conment-text-box">
				<div class="btn-list title plr10 ptb10 border f-cb">
                                    <a href="javascript:;" class="title-top title-left iconfont col-red close-jq _cancel" onclick="">&#xe668;</a>
                                    <a href="javascript:;" class="title-top title-right iconfont col-red comment-btn _send" data-comment-id="" data-comment-uuid="" data-disable-val="发送中" onclick="">&#xe66f;</a>
				</div>
				<div class="text-list plr10 ptb5 border">
					<textarea id="comment-content" class="w100"></textarea>
				</div>
			</div>
		</div>
                <!--分享 弹窗-->
                <div class="public-field-bj publick-jq2 share-video-box">
                    <div class="public-field-share w100 bj-grey share-content-box">
                        <div class="plr10 ptb30">
                            <ul class="f-cb" id="share-box">
                                <li data-type="sina"><a href="javascript:;" class="iconfont icon-weibo" >&#xe611;</a><p>微博</p></li>
                                <li data-type="qq-space"><a href="javascript:;" class="iconfont icon-space">&#xe7dc;</a><p>QQ空间</p></li>
                            </ul>
                        </div>
                        <a href="javascript:;" class="btn close-jq bj-white _close">取&nbsp;消</a>
                    </div>
                </div>
                <!--分享提示弹窗-->
                <div class="public-field-bj publick-jq5" id="wx-share" style="display: none;">
                        <img src="<{$style_dir}>/img/share.png">
                </div>
                <{include file="public/footer_login.html"}> 
	    <{include file="public/footer_banner.html"}>
		<script type="text/javascript" src="/static/js/native-sha-1.0.js"></script>
		<script type="text/javascript" src="/static/js/emotions.js"></script>
		<script type="text/javascript" src="/static/js/scrollpagination.js"></script>
		<script type="text/javascript" src="/static/js/html5media.min.js"></script>
		<script type="text/javascript" src="/static/js/video.min.1.0.js"></script>
                <script type="text/javascript">
                    $(function(){
                        $('body').delegate('.article-container .comments .all','click',function(e){
                            if( $(this).hasClass('active') ){
                                $(this).removeClass('active');
                                $(this).text('展开↓');
                                act1 = $(this).parent().children('.text').animate({'max-height':'70px'},500);
                            }else{
                                $(this).addClass('active');
                                $(this).text('收起↑');
                                act2 = $(this).parent().children('.text').animate({'max-height':'100%'},500);
                            }
                            e.stopPropagation();
                        });
                    });
                </script>
		<script type="text/javascript">
                    $(function(){
                        var appid = "<{$wxjsapi_config['appid']}>";
                        var timestamp = "<{$wxjsapi_config['timestamp']}>";
                        var nonceStr = "<{$wxjsapi_config['nonceStr']}>";
                        var signature = "<{$wxjsapi_config['signature']}>";
                        wx.config({
                            debug: false,appId: appid,timestamp: timestamp,nonceStr: nonceStr, signature: signature,
                            jsApiList:['checkJsApi','onMenuShareTimeline','onMenuShareWeibo','onMenuShareAppMessage','onMenuShareQQ','onMenuShareQZone' ] 
                        });
                        var _a = $("#_T_video_info"),_t=_a.attr("data-title"),_d=_a.attr("data-desc"),_l=_a.attr("data-link"),_i=_a.attr("data-thumb");
                        wx.ready(function(){
                            wx.onMenuShareAppMessage({title:_t,desc:_d,link:_l,imgUrl:_i,type: '',dataUrl: '',success: function () {},cancel: function () {}});
                            wx.onMenuShareTimeline({title:_t,desc:_d,link:_l,imgUrl:_i,success: function () {},cancel: function () {}});
                            wx.onMenuShareQQ({title:_t,desc:_d,link:_l,imgUrl:_i,type: '',dataUrl: '',success: function () {},cancel: function () {}});
                            wx.onMenuShareWeibo({title:_t,desc:_d,link:_l,imgUrl:_i,success: function () {},cancel: function () {}});
                            wx.onMenuShareQZone({title:_t,desc:_d,link:_l, imgUrl:_i,success: function () {},cancel: function () {}});
                        });
                        var currentPage = 0;
                        $('#comment-onload-box').scrollPagination({
                                'contentPage': "/ajax/get_video_comments_json",
                                'contentData': {
                                        'vid': $("#_T_video_info").attr("data-vid"),
                                        'currentPage': currentPage
                                },
                                'scrollTarget': $(window),
                                'heightOffset': 0,
                                'beforeLoad': function() { // before load function, you can display a preloader div
                                        $('#loading').fadeIn('fast');
                                        $('#loading').attr('scrollpagination','disabled');
                                },
                                'afterLoad': function(elementsLoaded) { // after loading content, you can use this function to animate your new elements
                                        $('#loading').fadeOut('fast');
                                        $('#loading').attr('scrollpagination','enabled');
                                        if (elementsLoaded.length == 0) {
                                                if(currentPage != 0){
                                                        $('#nomoreresults').fadeIn('slow');
                                                }
                                                $('#comment-onload-box').stopScrollPagination();
                                        }else{
                                                currentPage = currentPage + 1;
                                        }
                                        if(elementsLoaded.length == 0 && currentPage == 0){
                                                $("#noresults").fadeIn('slow');
                                        }else{
                                                for(var i=0;i<elementsLoaded.length;i++){
                                                        var str = AnalyticEmotion(elementsLoaded[i].innerHTML);
                                                        elementsLoaded[i].innerHTML = str;
                                                }
                                                
                                                this.contentData.currentPage = currentPage;
                                                $(elementsLoaded).fadeInWithDelay();
                                        }
                                        if ($('#comment-onload-box').children().length > 100) { // if more than 100 results already loaded, then stop pagination (only for testing)
                                                $('#nomoreresults').fadeIn();
                                                $('#comment-onload-box').stopScrollPagination();
                                        };
                                }
                        });
                        $.fn.fadeInWithDelay = function() {
                                var delay = 0;
                                return this.each(function() {
                                        $(this).delay(delay).animate({
                                                opacity: 1
                                        }, 200);
                                        delay += 100;
                                });
                        };
                    });
                    $(function(){showVideoRead();});
		</script>
<{include file="public/footer.html"}> 
